import ZLayout from "@/layout/ZLayout.vue";
import { RouteRecordRaw } from "vue-router";
import { placeHolderComponent } from "./helpers";

export const getOctpRoutes = (): RouteRecordRaw[] => [
  {
    path: "/octp",
    component: ZLayout,
    redirect: "/octp/manage/userList",
    meta: {
      title: "OCTP",
      icon: "SettingsIcon",
    },
    children: [
      {
        path: "manage",
        component: placeHolderComponent("OctpManage"),
        meta: {
          title: "管理",
          icon: "SettingsIcon",
        },
        children: [
          {
            path: "userList",
            name: "UserList",
            component: () => import("@views/Octp/User/UserList.vue"),
            meta: {
              title: "用户管理",
            },
          },
          {
            path: "commodityList",
            name: "CommodityList",
            component: () => import("@views/Octp/Commodity/CommodityList.vue"),
            meta: {
              title: "商品管理",
            },
          },
          {
            path: "selfInfo",
            name: "selfInfo",
            component: () => import("@views/Octp/Self/Info/SelfInfo.vue"),
            meta: {
              title: "个人信息",
            },
          },
        ],
      },
    ],
  },
];
